﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加服刑人员迁居信息</title>
<link href="/static/css/layout.css" rel="stylesheet" type="text/css" />
<link href="/static/css/cb.css" rel="stylesheet" type="text/css" />
<link href="/static/css/n.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css"
	href="/static/easyui/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="/static/easyui/themes/icon.css" />
<link rel="stylesheet" type="text/css" href="/static/easyui/demo/demo.css" />
<link rel="stylesheet" type="text/css"
	href="/static/js/laypage/skin/laypage.css" />

<script type="text/javascript" src="/static/easyui/jquery.min.js"></script>
<script src="/static/js/vue/vue.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/static/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/static/js/laypage/laypage.js"></script>
<script type="text/javascript" src="/static/laydate/laydate.js"></script>
</head>
<body>
	<div id="app1">
	<form id="saveForm" method="post">
	<table width="560px" height="300px" border="0" align="center"
		cellpadding="3" cellspacing="1" bgcolor="#AEDEF4">
		<tr>
			<td align="center" bgcolor="#E2F7FE">
				<table width="80%" border="0" cellspacing="1" cellpadding="3">
					<tr style="height: 50px">
						<td width="15%" align="right"><strong>矫正单位：</strong></td>
						<td width="10%" align="left">
							<select id="jid1" name="j_id" style="width: 220px; height: 30px" onchange="getMovePersonel1()">
                                <option>--请选择--</option>
							    <#list judicialDeptmentList as jd>
									<option value="${jd.id}">${jd.name}</option>
								</#list>
							</select>
						</td>
					</tr>
					<tr style="height: 50px">
						<td width="15%" align="right"><strong>服刑人员：</strong></td>
						<td width="10%" align="left">
							<select id="cid1" name="c_id" style="width: 220px; height: 30px" onchange="getDetail()" >
								<option>--请选择--</option>
								<option v-for="item in result" :value="item.id">{{item.name}}</option>
							</select>
						</td>
					</tr>
					<tr style="height: 50px">
						<td width="15%" align="right"><strong>迁居日期：</strong></td>
						<td width="10%" align="left">
							<input placeholder="请输入日期" style="width: 220px; height: 30px"
								   onclick="laydate()" name="moveDate" />
						</td>
					</tr>
					<tr style="height: 50px">
						<td width="15%" align="right"><strong>迁居地点：</strong></td>
						<td width="10%" align="left"><input name="movePlace"
							data-options="prompt:'请输入迁居地点',required:true"
							class="easyui-textbox" value=""
							style="width: 220px; height: 30px" /></td>
					</tr>
					<tr style="height: 50px">
						<td width="15%" align="right"><strong>工作单位：</strong></td>
						<td width="10%" align="left"><input name="moveOrg"
							data-options="prompt:'请输入工作单位',required:true"
							class="easyui-textbox" value=""
							style="width: 220px; height: 30px"  /></td>
					</tr>
					<tr style="height: 50px" v-for="item1 in result1">
						<td width="15%" align="right"><strong>政治面貌：</strong></td>
						<td width="10%" align="left"><input name="move_zz_status"
							class="easyui-textbox" :value="item1.zz_status"
							style="width: 220px; height: 30px" readonly /></td>
					</tr>
					<tr style="height: 50px" v-for="item1 in result1">
						<td width="15%" align="right"><strong>亲属姓名：</strong></td>
						<td width="10%" align="left"><input name="r_name"
							class="easyui-textbox" :value="item1.rname"
							style="width: 220px; height: 30px" readonly /></td>
					</tr>
					<tr style="height: 50px" v-for="item1 in result1">
						<td width="15%" align="right"><strong>亲属关系：</strong></td>
						<td width="10%" align="left"><input name="moveRelation"
							class="easyui-textbox" :value="item1.relation"
							style="width: 220px; height: 30px" readonly /></td>
					</tr>
					<tr style="height: 50px" v-for="item1 in result1">
						<td width="15%" align="right"><strong>家庭住址：</strong></td>
						<td width="10%" align="left"><input name="moveAddress"
							class="easyui-textbox" :value="item1.address"
							style="width: 220px; height: 30px" readonly /></td>
					</tr>
					<tr style="height: 50px">
						<td width="15%" align="right"><strong>就业情况：</strong></td>
						<td width="10%" align="left">
							<select name="moveJob" style="width: 220px; height: 30px">
									<option value="就业">就业</option>
									<option value="待业">待业</option>
							</select>
						</td>
					</tr>
					<tr style="height: 50px">
						<td width="15%" align="right"><strong>迁居状态：</strong></td>
						<td width="10%" align="left">
							<select name="moveStatus" style="width: 220px; height: 30px">
									<option value="已迁居">已迁居</option>
									<option value="未迁居">未迁居</option>
							</select>
						</td>
					</tr>
					<tr style="height: 50px">
						<td width="15%" align="right"><strong>备注：</strong></td>
						<td width="10%" align="left"><input name="moveRemarks"
							data-options="prompt:'请填写备注'"
							class="easyui-textbox" value=""
							style="width: 220px; height: 30px" /></td>
					</tr>
					<tr style="height: 50px">
						<td width="15%" align="right"><strong>迁居事由：</strong></td>
						<td width="10%" align="left">
						<textarea rows="2" cols="25" name="moveReson"> </textarea></td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	</form>
	</div>
	<script type="text/javascript">
		var app1 = new Vue({
			el : '#app1',
			data : {
				result : [],
				result1 : []
			}
		});
		/*此处jid1、cid1是为了和上级主页面的jid、cid区分开来，否则会出问题*/
		var getMovePersonel1 = function(){
			$.ajax({
				url:"/movePersonel/getAllCorrectedPerson",
				data:{
					id:$('#jid1').val()
				},
				success:function(result){
					app1.result = result.data;
				}
			});
		}
		
		var getDetail = function(){
			$.ajax({
				url:"/movePersonel/getCorrectedPersonDetail",
				data:{
					id:$('#cid1').val()
				},
				success:function(result){
					app1.result1 = result.data;
				}
			});
		}
	</script>
</body>
</html>